<template>
	<div id="mine" class="mine">
		<div id="mineCell" class="mineCell">
			<group class="mineCellGroup">
				<cell class="mineCell" :title="rawCustomer" @click.native="onClick('rawCustomer')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_raw_customer.svg">
				</cell>
				<cell class="mineCell" :title="poCustomer" @click.native="onClick('poCustomer')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_po_customer.svg">
				</cell>
				<cell class="mineCell" :title="reContractCustomer" @click.native="onClick('reContractCustomer')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_recontract_customer.svg">
				</cell>
			</group>

			<group class="mineCellGroup">
				<cell class="mineCell" :title="raisePlan" @click.native="onClick('raisePlan')">
					<img slot="icon" class="mine_icon" src="@/assets/svg/icon_raise_plan.svg">
				</cell>
			</group>
		</div>
	</div>
</template>

<script>
	import bus from '@/event/eventBus'
	import {Divider, Card, Cell, Group} from 'vux'
	export default {
		name: "sys-manage",
		components: {
			Divider,
			Card,
			Cell,
			Group
		},
		data() {
			return {
				rawCustomer: '原始客户建议',
				poCustomer: '准客户建议',
				reContractCustomer: '待续课客户建议',
				raisePlan: '成长计划表',
			}
		},
		created: function () {
			bus.$emit("barController", 1)
			bus.$emit("setTopSimpleTitle", '系统管理')
		},
		methods: {
			onClick: function(value) {
				switch(value){
					case 'rawCustomer':
						this.$router.push({name: 'elementManageHtml', params: {templateTitle: this.rawCustomer, templateType: 'S_LOV_AI_RAW_CUS', newComp: 'elementNewHtml', updateComp: 'elementUpdateHtml'}})
						break
					case 'poCustomer':
						this.$router.push({name: 'elementManageHtml', params: {templateTitle: this.poCustomer, templateType: 'S_LOV_AI_PO_CUS', newComp: 'elementNewHtml', updateComp: 'elementUpdateHtml'}})
						break
					case 'reContractCustomer':
						this.$router.push({name: 'elementManageHtml', params: {templateTitle: this.reContractCustomer, templateType: 'S_LOV_AI_RENEW_CUS', newComp: 'elementNewHtml', updateComp: 'elementUpdateHtml'}})
						break
					case 'raisePlan':
						this.$router.push({name: 'elementManage', params: {templateTitle: this.raisePlan, templateType: 'S_LOV_OPP_LEVEL', newComp: 'elementNew'}})
						break
					default:
						break
				}
			}
		}
	}
</script>

<style lang="less">
	@import '../../../../node_modules/vux/src/styles/1px.less';

	.card-demo-flex {
		display: flex;
	}
	.card-demo-content01 {
		padding: 10px 0;
	}
	.card-padding {
		padding: 15px;
	}
	.card-demo-flex > div {
		flex: 1;
		text-align: center;
		font-size: 12px;
	}
	.card-demo-flex span {
		color: #f74c31;
	}

	.mine{
		background: #8080800d;
		margin-top: 46px;
		margin-bottom: 100px;
	}

	.mineCell{
		padding: 0 0 !important;
	}

	.mine_icon {
		width: 20px;
		display: block;
		margin-right: 25px;
		margin-left: 10px;
	}

	.mineCellGroup {
		border-radius: 0px !important;
	}

</style>
